<?
REQUIRE ("include/login.php");
REQUIRE ("$templates/up.php");
REQUIRE ("protect/connect.php");
//require ("../templates/default/up.php");
//require ("/include/connect.php");
 echo "<table width=\"800\" border=\"1\" align=\"center\" cellspacing=\"0\" bordercolor=\"#000000\"><tr>";
   echo"<tr><td whidth=\"50\"><div align=\"center\">Images</a></div></td>
       <td width=\"20%\"><div align=\"center\">Numero ID</div></td>
       <td width=\"20%\"><div align=\"center\">Nom</div></td>
       <td width=\"50\"><div align=\"center\">Images</div></td>
       <td width=\"20%\"><div align=\"center\">Numero ID</div></td>
       <td width=\"20%\"><div align=\"center\">Nom</div></td>
       </td>";

$query="SELECT batiment_id,batiment_icon,batiment_name FROM ubatiment order by batiment_id";
$resultat=mysql_query($query);
$onverra=0;

while ($forum =mysql_fetch_array($resultat) )
{
$lien="window.open('race.php?raceid=$forum[0]', 'Abonnement', 'scrollbars=yes,status=no,top=0,left=0,width=420,height=500')";


       if($onverra==0){
      echo"<tr>";
           $onverra=1;
          }

       echo"<td width=\"50\"><div align=\"center\"><img src=\"images/batiments/$forum[1]\"></div></td>
       <td width=\"20%\"><div align=\"center\">$forum[0]</div></td>
       <td whidth=\"20%\"><div align=\"center\"><a href=\"#\" onClick=\"$lien\">$forum[2]</a></div></td>";


        IF($onverra==2){
       echo"</td>";
       }
       IF($onverra==2){
            $onverra=0;
       }

        IF($onverra==1){
            $onverra=2;

        }


        

}//Fin du while
echo "</table>";
mysql_close;
?>
